import { App } from 'vue';
// elementplus icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import { ElMessage, ElMessageBox } from 'element-plus';

export default {
  install(app: App) {
    //全局注册elementplus icon
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component);
    }

    // 将消息提示组件注册为全局方法
    // app.config.globalProperties.$message = ElMessage;
    // app.config.globalProperties.$messageBox = ElMessageBox;
  },
};
